home *** CD-ROM | disk | FTP | other *** search
/ Power Bytes: Money & Finance / PowerBytes Money and Finance CD-ROM 01 / PowerBytes Money and Finance CD-ROM 01.iso / HyperCard Files / Scripting Aids & Tips / CardMover 1.1 / CardMover 1.1 / card_3166.txt < prev    next >
Encoding:
Text File  |  1988-04-23  |  9.1 KB  |  371 lines

  1. -- card: 3166 from stack: in.1
  2. -- bmap block id: 2435
  3. -- flags: 4000
  4. -- background id: 2632
  5. -- name: The Main Event
  6. ----- HyperTalk script -----
  7. on openCard
  8.   show menuBar
  9.   pass openCard
  10. end openCard
  11.  
  12. on closeCard
  13.   hide card field "ha"
  14.   pass closeCard
  15. end closeCard
  16.  
  17.  
  18. -- part 2 (field)
  19. -- low flags: 01
  20. -- high flags: 2002
  21. -- rect: left=278 top=31 right=330 bottom=504
  22. -- title width / last selected line: 0
  23. -- icon id / first selected line: 0 / 0
  24. -- text alignment: 1
  25. -- font id: 3
  26. -- text size: 12
  27. -- style flags: 0
  28. -- line height: 16
  29. -- part name: More info
  30.  
  31.  
  32. -- part 3 (button)
  33. -- low flags: 00
  34. -- high flags: 2000
  35. -- rect: left=487 top=0 right=18 bottom=512
  36. -- title width / last selected line: 0
  37. -- icon id / first selected line: 1015 / 1015
  38. -- text alignment: 1
  39. -- font id: 0
  40. -- text size: 12
  41. -- style flags: 0
  42. -- line height: 16
  43. -- part name: Reset //
  44. ----- HyperTalk script -----
  45. on mouseUp
  46.   show card window at 0,0
  47.   show menuBar
  48.   play "boing" tempo 30 "20"
  49. end mouseUp
  50.  
  51.  
  52. -- part 6 (button)
  53. -- low flags: 00
  54. -- high flags: 8000
  55. -- rect: left=398 top=0 right=18 bottom=488
  56. -- title width / last selected line: 0
  57. -- icon id / first selected line: 0 / 0
  58. -- text alignment: 1
  59. -- font id: 0
  60. -- text size: 12
  61. -- style flags: 0
  62. -- line height: 16
  63. -- part name: WindowReset
  64. ----- HyperTalk script -----
  65. on mouseUp
  66.   show card window at 0,0
  67.   show menuBar
  68.   play "boing" tempo 30 "20"
  69. end mouseUp
  70.  
  71.  
  72. -- part 10 (field)
  73. -- low flags: 81
  74. -- high flags: 0001
  75. -- rect: left=52 top=174 right=225 bottom=159
  76. -- title width / last selected line: 0
  77. -- icon id / first selected line: 0 / 0
  78. -- text alignment: 1
  79. -- font id: 0
  80. -- text size: 12
  81. -- style flags: 0
  82. -- line height: 16
  83. -- part name: ha
  84.  
  85.  
  86. -- part 9 (button)
  87. -- low flags: 00
  88. -- high flags: 0000
  89. -- rect: left=24 top=75 right=298 bottom=184
  90. -- title width / last selected line: 0
  91. -- icon id / first selected line: 0 / 0
  92. -- text alignment: 1
  93. -- font id: 0
  94. -- text size: 12
  95. -- style flags: 0
  96. -- line height: 16
  97. -- part name: Hahaha
  98. ----- HyperTalk script -----
  99. on mouseUp
  100.   if the visible of card field "ha" is true then hide card field "ha"
  101.   else
  102.     talk "hahahaha.ha.",165,110
  103.     show card field "ha"
  104.     talk "Well, thank yoo.",165,110
  105.   end if
  106. end mouseUp
  107.  
  108.  
  109. -- part 12 (button)
  110. -- low flags: 00
  111. -- high flags: A003
  112. -- rect: left=207 top=195 right=252 bottom=272
  113. -- title width / last selected line: 0
  114. -- icon id / first selected line: 27056 / 27056
  115. -- text alignment: 1
  116. -- font id: 0
  117. -- text size: 12
  118. -- style flags: 0
  119. -- line height: 16
  120. -- part name: Copy Button
  121. ----- HyperTalk script -----
  122. on setButton
  123.   put"Once you've clicked, please don't move the mouse for a secΓǪ"
  124.   wait until the mouse is down
  125.   repeat until the mouse is up
  126.     get the mouseLoc
  127.     set the loc of card button "Move it!" to it
  128.   end repeat
  129.   hide message
  130. end setButton
  131.  
  132. on mouseup
  133.   play harpsichord fast
  134.   talk "Are you sure about that,",165,110
  135.   answer "Do you want to copy the 'Move it' button?" with "Yes" or "No"
  136.   if it is "No" then
  137.     play boing
  138.     talk "owkay, not this time.",165,110
  139.     exit mouseup
  140.   end if
  141.   hide tool window
  142.   hide pattern window
  143.   talk "Here we go.",165,110
  144.   put the long name of this stack into thisStack
  145.   show message at 17,298
  146.   put "          Where do you want it?"
  147.   talk "Where do you want the button?",165,110
  148.   put fileName (STAK) into stackName
  149.   hide message
  150.   if stackName is not empty then
  151.     if the long name of stackName is thisStack
  152.     then
  153.     play boing
  154.     talk "Oops",165,110
  155.     answer "You donΓÇÖt want to copy it to this stack!" with OK
  156.     exit mouseUp
  157.   else
  158.     set cursor to 4
  159.     get the userLevel
  160.     put it into rememberLevel
  161.     set the userLevel to 4
  162.     set lockScreen to true
  163.     choose button tool
  164.     show card button ID 23
  165.     click at the loc of card button ID 23
  166.     doMenu "Copy Button"
  167.     hide card button ID 23
  168.     set lockScreen to false
  169.     set lockMessages to true
  170.     set cursor to 4
  171.     go to stack stackName
  172.     choose button tool
  173.     doMenu "Paste Button"
  174.     talk "Please poasition the button",165,110
  175.     answer "Please click wherever you want the button." with "OK"
  176.     repeat until it is "Yes"
  177.       setButton
  178.       answer "Is this where you want it?" with "Yes" or "No"
  179.     end repeat
  180.     set hilite of card button "Move it!" to false
  181.     put "    Got it!    Please stand by a minute for some housekeepingΓǪ"
  182.     talk "Sit tight for a minnut",165,110
  183.     set lockScreen to true
  184.     set cursor to 4
  185.     go to card 2 of thisStack
  186.     choose button tool
  187.     hide menuBar
  188.     click at the loc of card button "Reset //"
  189.     doMenu "Copy button"
  190.     set cursor to 4
  191.     go to stack stackName
  192.     doMenu "Paste Button"
  193.     set cursor to 4
  194.     go to card 2 of thisStack
  195.     click at the loc of card button "WindowReset"
  196.     doMenu "Copy button"
  197.     set cursor to 4
  198.     go to stack stackName
  199.     doMenu "Paste Button"
  200.     put "    Just about finishedΓǪ  thanks for being patient!"
  201.     talk "Hang on, we're just about done.",165,110
  202.     choose browse tool
  203.     if the userLevel>2 then
  204.       doMenu Compact stack
  205.     end if
  206.     show menuBar
  207.     set lockScreen to false
  208.     hide message
  209.     set cursor to 4
  210.     go to card 2 of thisStack
  211.     get rememberLevel
  212.     set the userLevel to it
  213.     set lockMessages to false
  214.     flash 3
  215.     beep 2
  216.     talk "That's,got it.",165,110
  217.     answer "You're all setΓǪ copying is done." with "Thanks!"
  218.   end if
  219. else
  220.   put "              Oh,wellΓǪ  maybe next time."
  221.   play boing
  222.   talk "Let me know if you change your mind.",165,110
  223.   wait 2 secs
  224.   hide message
  225. end if
  226. end mouseUp
  227.  
  228.  
  229. -- part 16 (button)
  230. -- low flags: 00
  231. -- high flags: A003
  232. -- rect: left=199 top=61 right=172 bottom=253
  233. -- title width / last selected line: 65535
  234. -- icon id / first selected line: -15767 / 49769
  235. -- text alignment: 1
  236. -- font id: 0
  237. -- text size: 12
  238. -- style flags: 0
  239. -- line height: 16
  240. -- part name: Move it!
  241. ----- HyperTalk script -----
  242. on moveit
  243.   show card window at -384,317
  244.   play "harpsichord" tempo 1000 "100"
  245. end moveit
  246.  
  247. on mouseUp
  248.   if the hilite of card button "User Pref" is true then
  249.     put multiFinder() into mfResult
  250.   else
  251.     moveit
  252.     exit mouseUp
  253.   end if
  254.   if mfResult is true then
  255.     moveit
  256.   else
  257.     beep
  258.     talk "Oops, there's no multifinder!",165,110
  259.     answer "Sorry, MultiFinder is not running right now." with OK
  260.     talk "I can move it if you uncheck the box on top of the screen.",165,120
  261.   end if
  262. end mouseUp
  263.  
  264.  
  265. -- part 18 (button)
  266. -- low flags: 00
  267. -- high flags: 0000
  268. -- rect: left=196 top=279 right=303 bottom=264
  269. -- title width / last selected line: 0
  270. -- icon id / first selected line: 0 / 0
  271. -- text alignment: 1
  272. -- font id: 0
  273. -- text size: 12
  274. -- style flags: 0
  275. -- line height: 16
  276. -- part name: Prev
  277. ----- HyperTalk script -----
  278. on mouseUp
  279.   visual dissolve to inverse
  280.   visual dissolve
  281.   go prev
  282. end mouseUp
  283.  
  284.  
  285. -- part 19 (button)
  286. -- low flags: 00
  287. -- high flags: 0000
  288. -- rect: left=199 top=305 right=333 bottom=262
  289. -- title width / last selected line: 0
  290. -- icon id / first selected line: 0 / 0
  291. -- text alignment: 1
  292. -- font id: 0
  293. -- text size: 12
  294. -- style flags: 0
  295. -- line height: 16
  296. -- part name: Next
  297. ----- HyperTalk script -----
  298. on mouseUp
  299.   visual dissolve to inverse
  300.   visual dissolve
  301.   go next
  302. end mouseUp
  303.  
  304.  
  305. -- part 21 (button)
  306. -- low flags: 00
  307. -- high flags: 2005
  308. -- rect: left=4 top=24 right=45 bottom=270
  309. -- title width / last selected line: 0
  310. -- icon id / first selected line: 0 / 0
  311. -- text alignment: 1
  312. -- font id: 0
  313. -- text size: 12
  314. -- style flags: 0
  315. -- line height: 16
  316. -- part name: User Pref
  317. ----- HyperTalk script -----
  318. on mouseUp
  319.   if the hilite of me is true then
  320.     play harpsichord fast
  321.     talk "I'll start checking multifinder.",165,110
  322.   else
  323.     play harpsichord fast
  324.     talk "I'll quit checking for multifinder.",165,110
  325.   end if
  326. end mouseUp
  327.  
  328. --   SorryΓǪ I wanted to include the automatic copy of this button too,
  329. -- but it seems to take too long. The end-user winds up sitting and
  330. -- waiting for several minutes while the whole process goes on, which
  331. -- includes copying the Paint background surrounding the button. If
  332. -- anyone really would find it useful, and isnΓÇÖt able to do it them-
  333. -- selves, IΓÇÖll consider it for a future project. (But if you've gotten
  334. -- this far, you can probably figure it out!)
  335. --                                              2/17/88 ΓÇó Tom Robinson
  336.  
  337.  
  338. -- part 23 (button)
  339. -- low flags: 80
  340. -- high flags: E003
  341. -- rect: left=328 top=89 right=200 bottom=382
  342. -- title width / last selected line: 65535
  343. -- icon id / first selected line: -15767 / 49769
  344. -- text alignment: 1
  345. -- font id: 0
  346. -- text size: 12
  347. -- style flags: 0
  348. -- line height: 16
  349. -- part name: Move it!
  350. ----- HyperTalk script -----
  351. on mouseUp
  352.   show card window at -384,317
  353.   play harpsichord tempo 1000 "100"
  354. end mouseUp
  355.  
  356.  
  357. -- part contents for card part 2
  358. ----- text -----
  359. Go through the CardMover Demo button script on the previous card to see what's going on. The
  360. ΓÇ£Move it!ΓÇ¥ button is set up to get the Card down and to the side
  361. (out of the way), so you can get to the rest of your applications
  362. & DAs. YouΓÇÖll then find a WindowReset button if you want it lined up again. And of course, you can drag it by the title bar like any other window. ΓÇ£Copy ButtonΓÇ¥ on this card will copy
  363. ΓÇ£Move it!ΓÇ¥ (and ΓÇ£WindowResetΓÇ¥) to any stack you specify.
  364.  
  365. Tom Robinson
  366. ΓÇó CIS 73250,2773 ΓÇó
  367.  
  368. -- part contents for card part 10
  369. ----- text -----
  370. Well, thank you
  371. very much!!